1. Field of the Invention
The present invention relates to an image processing technique for accurately detecting a specific image.
2. Description of the Related Art
Recently, electronic image data including a mixture of images with different attributes such as character images, natural images, and CG images have been used. It is preferable to process such an image by using image processing or an encoding method suitable for the attribute of each image area in the image.
One of characteristic image areas is a pattern image having almost constant periodicity. A pattern image is, for example, an image having a specific pixel value for each pixel, which is generated when semitransparency processing is performed for an object by setting a predetermined transparency in a presentation material or the like. Moire or roughness may occur in such an area of a printed image. In addition, subsampling or resolution conversion will cause a considerable change in image quality. For this reason, it is required to switch processes depending on the characteristic of an image when performing image processing of conversion to printout data or resolution conversion.
When, for example, the resolution of an original image is to be converted to ½ in both the horizontal and vertical directions, the average value of 2×2 pixels, i.e., four pixels, in the original image shown in FIG. 2 is often set as a pixel value after resolution conversion. Assume that an original image is a monochrome image represented by eight bits (256 gray levels) per pixel.
Assume an image whose pixel values alternately switch between 0 and 255. In this case, each pixel of the image after resolution conversion is uniformly set to “128”, thus producing visible differences between the converted image and the original image. It is therefore necessary to suppress a deterioration in image quality by detecting a pattern image having constant periodicity using a technique of segmenting an image into character, natural image, and halftone dot areas.
Conventionally, there has been known a segmentation technique with a small hardware size, which exhibits high accuracy regardless of whether an image to be processed is a monochrome or color image. This is typically a scheme of segmenting an image into blocks and extracting a feature amount from the image data of a pixel of interest in each block in the main-scanning direction, thereby determining whether the pixel of interest belongs to a specific one of a solid area, photographic area, character area, halftone dot area, and the like (e.g., Japanese Patent Laid-Open No. 2002-232709).
In addition, a technique of controlling the characteristics of a gamma conversion unit by determining the continuity of black pixels within an image is known as an image processing apparatus which improves the image quality of image data obtained by raster scanning (e.g., Japanese Patent Laid-Open No. 2000-125132).
The conventional scheme, however, needs to perform determination by seeing an image in both the main-scanning direction and the sub-scanning direction. This requires complicated processing.